package com.zzy.web.controller.order;

import com.zzy.common.core.domain.AjaxResult;
import com.zzy.system.service.ISaleOrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 登录验证
 * 
 * @author zzy
 */
@Api(value = "Order", tags = {"销售订单"}, hidden = false)
@RestController
public class SaleOrderController
{
    @Autowired
    private ISaleOrderService iSaleOrderService;

    @GetMapping("/getGuanmaiSaleOrderList")
    @ApiOperation("获取观麦销售订单列表")
    public AjaxResult getGuanmaiSaleOrderList(@RequestParam(value = "status",defaultValue = "15") Integer status,
                                                     @RequestParam("startDate") String startDate,
                                                     @RequestParam("endDate") String endDate,
                                                     @RequestParam(value = "offset",defaultValue = "0") Integer offset,
                                                     @RequestParam(value = "limit",defaultValue = "100") Integer limit,
                                                     @RequestParam(value = "queryType",defaultValue = "1") Integer queryType
                                                     ) throws Exception {
        AjaxResult ajax = AjaxResult.success();
        iSaleOrderService.getGuanmaiSaleOrderList(status, startDate, endDate, offset, limit,queryType);
        return ajax;
    }
    @GetMapping("/getGuammaiSaleOrderDetails")
    @ApiOperation("获取观麦销售订单详情")
    public AjaxResult getGuammaiSaleOrderDetails() throws Exception {
        AjaxResult ajax = AjaxResult.success();
        iSaleOrderService.getGuammaiSaleOrderDetails();
        return ajax;
    }


}
